<template>
	<view class="content">
		<u--image :showLoading="true" :src="src" width="750rpx" height="600rpx" @click="click"></u--image>
		<u-gap height="20rpx" bgColor="#f5f5f5"></u-gap>
		<view class="info">
			<view class="ui_lable">
				<text class="text">认证名称</text>
				<text>xx</text>
			</view>
			<view class="ui_lable">
				<text class="text">颁证机构</text>
				<text>xx</text>
			</view>
			<view class="ui_lable">
				<text class="text">企业信息码</text>
				<text>xx</text>
			</view>
			<view class="ui_lable">
				<text class="text">颁证日期</text>
				<text>xx</text>
			</view>
			<view class="ui_lable">
				<text class="text">失效日期</text>
				<text>xx</text>
			</view>
			<image class="zhengshu" src="http://zyht.ncp3600.com/upload/208c86fc-ec18-4ff7-b568-290264189bdf.jpg" mode="widthFix"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src: 'https://img2.baidu.com/it/u=2112311137,2912593221&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500'
			}
		},
		methods: {
			nav_go(url) {
				console.log(url)
				this.$util.navTo(url)
			},
			load_info(){
				this.$http.req('get', "traceability/code/"+this.code, {}, this).then(res => {
					var data = res.data.data
					if (res.data.code == 200) {
						console.log(data)
						this.info = data.product
						this.batch = data.batch
						this.certificate = data.certificate
						uni.setStorageSync('enterprise',data.product.enterprise)
					}
				})
			}
		}
	}
</script>

<style lang="less">
	.content {
		width: 750rpx;
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		.info{
			background-color: #fff;
			width: 690rpx;
			padding: 20rpx;
			border-radius: 20rpx;
			margin-top: 30rpx;
			box-shadow: 2px #ddd;
			border: 1px solid #f2f2f2;
			display: flex;
			flex-direction: column;
			.ui_lable{
				margin-bottom: 15rpx;
				display: flex;
				flex-wrap: wrap;
				font-size: 28rpx;
				color: #666;
				.text{
					color: #333;
					width: 180rpx;
				}
			}
			.zhengshu{
				width: 100%;
				border-radius: 20rpx;
			}
		}
	}
</style>
